package com.obroom.calculator;

import java.util.function.DoubleBinaryOperator;

/**
 * Created by huanglb on 2017/2/20.
 */
public enum Operation {
    ADDITION((x, y) -> x + y),
    SUBTRACTION((x, y) -> x - y),
    DIVISION((x, y) -> x / y),
    MULTIPLICATION((x, y) -> x * y),
    PERCENTAGE((x, y) -> x % y);

    private DoubleBinaryOperator operator;

    Operation(DoubleBinaryOperator operator) {
        this.operator = operator;
    }

    public DoubleBinaryOperator getOperator() {
        return operator;

    }

}
